const sequelize = require('../config/sequelize')
const Sequelize = require('sequelize')

const User = sequelize.define('user', {
    userId: {
        type: Sequelize.BIGINT,
        field: 'id'
    },
    account: {
        type: Sequelize.STRING(20),
        field: 'account'
    },
    password: {
        type: Sequelize.STRING(100),
        field: 'password'
    },
    username: {
        type: Sequelize.STRING(48),
        field: 'username'
    },
    portraitId: {
        type: Sequelize.BIGINT,
        field: 'portrait_id'
    },
    email: {
        type: Sequelize.STRING(45),
        field: 'email'
    },
    hobbies: {
        type: Sequelize.STRING(32),
        field: 'hobbies'
    },
    birthday: {
        type: Sequelize.DATE,
        field: 'birthday'
    },
    address: {
        type: Sequelize.STRING(300),
        field: 'address'
    },
    mobilephone: {
        type: Sequelize.STRING(32),
        field: 'mobilephone'
    }
})

module.exports = User